package com.itheima.health.controller.user;

import com.itheima.health.entity.Result;
import com.itheima.health.service.SetMealService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mobile/setmeal")
@Slf4j
public class UserSetMealController {

    @Autowired
    private SetMealService setMealService;

    /**
     * 体检预约-全部套餐查询
     * @return
     */
    @GetMapping("/getSetmeal")
    public Result getSetmeal() {
        log.info("[C端-体检预约_全部套餐查询]data:{},getSetmeal:{}");
        return setMealService.getSetmeal();
    }

    /**
     * C端-查询套餐详情
     *
     * @param id
     * @return
     */
    @GetMapping("/findById")
    public Result findById(Integer id) {
        log.info("[C端-体检预约_查询套餐详情]data:{},findById:{}", id);
        return setMealService.userFindById(id);
    }
}

